#ifndef INVOICEPRINTER_H
#define INVOICEPRINTER_H

#include "Invoice.h"
#include "InvoiceItem.h"

#include <QTextStream>

namespace ecocity
{

class InvoicePrinter
{

public:

    /*
     * Prints a txt file
     */
    static bool print( const QString& path_file,
                       const Invoice& invoice );

    static QString taxes_summary( const Invoice& invoice );

    static QString final_summary( const Invoice& invoice );

//private:

    static void print_header( QTextStream& stream,
                              const Invoice& invoice );

    static void print_invoice_items( QTextStream& stream,
                                     const std::vector< InvoiceItem >& items );

    static void print_invoice_item( QTextStream& stream,
                                    const InvoiceItem& item );

    static void print_invoice_item_description( QTextStream& stream,
                                                const InvoiceItem& item );

    static void print_invoice_item_discount( QTextStream& stream,
                                             const InvoiceItem& item );

    static void print_invoice_item_tax_rate( QTextStream& stream,
                                             const InvoiceItem& item );
};

}      // namespace liga


#endif // INVOICEPRINTER_H
